home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / lcocxweb / samples.exe / 3DButtons / Form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-08-04  |  8.1 KB  |  234 lines

  1. VERSION 5.00
  2. Object = "{B190576C-254A-11D2-B61E-C80424DEEF17}#51.0#0"; "LCocx.ocx"
  3. Begin VB.Form Form1 
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "3D Buttons"
  6.    ClientHeight    =   2856
  7.    ClientLeft      =   36
  8.    ClientTop       =   324
  9.    ClientWidth     =   4572
  10.    ClipControls    =   0   'False
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    ScaleHeight     =   2856
  14.    ScaleWidth      =   4572
  15.    StartUpPosition =   2  'CenterScreen
  16.    Begin LCocx98.LCocx LCocx1 
  17.       Left            =   2040
  18.       Top             =   1800
  19.       _ExtentX        =   868
  20.       _ExtentY        =   656
  21.    End
  22.    Begin VB.PictureBox Picture1 
  23.       AutoSize        =   -1  'True
  24.       BorderStyle     =   0  'None
  25.       ClipControls    =   0   'False
  26.       Height          =   384
  27.       Index           =   3
  28.       Left            =   2760
  29.       Picture         =   "Form1.frx":0000
  30.       ScaleHeight     =   384
  31.       ScaleWidth      =   384
  32.       TabIndex        =   10
  33.       Top             =   120
  34.       Width           =   384
  35.    End
  36.    Begin VB.PictureBox Picture1 
  37.       AutoSize        =   -1  'True
  38.       BorderStyle     =   0  'None
  39.       ClipControls    =   0   'False
  40.       Height          =   384
  41.       Index           =   2
  42.       Left            =   2040
  43.       Picture         =   "Form1.frx":0442
  44.       ScaleHeight     =   384
  45.       ScaleWidth      =   384
  46.       TabIndex        =   9
  47.       Top             =   120
  48.       Width           =   384
  49.    End
  50.    Begin VB.PictureBox Picture1 
  51.       AutoSize        =   -1  'True
  52.       BorderStyle     =   0  'None
  53.       ClipControls    =   0   'False
  54.       Height          =   384
  55.       Index           =   1
  56.       Left            =   1320
  57.       Picture         =   "Form1.frx":0884
  58.       ScaleHeight     =   384
  59.       ScaleWidth      =   384
  60.       TabIndex        =   8
  61.       Top             =   120
  62.       Width           =   384
  63.    End
  64.    Begin VB.PictureBox Picture1 
  65.       AutoSize        =   -1  'True
  66.       BorderStyle     =   0  'None
  67.       ClipControls    =   0   'False
  68.       Height          =   384
  69.       Index           =   0
  70.       Left            =   600
  71.       Picture         =   "Form1.frx":0CC6
  72.       ScaleHeight     =   384
  73.       ScaleWidth      =   384
  74.       TabIndex        =   7
  75.       Top             =   120
  76.       Width           =   384
  77.    End
  78.    Begin VB.PictureBox Picture3 
  79.       AutoSize        =   -1  'True
  80.       BorderStyle     =   0  'None
  81.       ClipControls    =   0   'False
  82.       Height          =   384
  83.       Index           =   2
  84.       Left            =   1080
  85.       Picture         =   "Form1.frx":1108
  86.       ScaleHeight     =   384
  87.       ScaleWidth      =   384
  88.       TabIndex        =   6
  89.       Top             =   1440
  90.       Width           =   384
  91.    End
  92.    Begin VB.PictureBox Picture3 
  93.       AutoSize        =   -1  'True
  94.       BorderStyle     =   0  'None
  95.       ClipControls    =   0   'False
  96.       Height          =   384
  97.       Index           =   1
  98.       Left            =   1560
  99.       Picture         =   "Form1.frx":154A
  100.       ScaleHeight     =   384
  101.       ScaleWidth      =   384
  102.       TabIndex        =   5
  103.       Top             =   1440
  104.       Width           =   384
  105.    End
  106.    Begin VB.PictureBox Picture3 
  107.       AutoSize        =   -1  'True
  108.       BorderStyle     =   0  'None
  109.       ClipControls    =   0   'False
  110.       Height          =   384
  111.       Index           =   0
  112.       Left            =   2040
  113.       Picture         =   "Form1.frx":198C
  114.       ScaleHeight     =   384
  115.       ScaleWidth      =   384
  116.       TabIndex        =   4
  117.       Top             =   1440
  118.       Width           =   384
  119.    End
  120.    Begin VB.PictureBox Picture3 
  121.       AutoRedraw      =   -1  'True
  122.       BorderStyle     =   0  'None
  123.       ClipControls    =   0   'False
  124.       Height          =   384
  125.       Index           =   5
  126.       Left            =   1560
  127.       Picture         =   "Form1.frx":1DCE
  128.       ScaleHeight     =   384
  129.       ScaleWidth      =   972
  130.       TabIndex        =   3
  131.       Top             =   2160
  132.       Width           =   972
  133.    End
  134.    Begin VB.PictureBox Picture3 
  135.       AutoSize        =   -1  'True
  136.       BorderStyle     =   0  'None
  137.       ClipControls    =   0   'False
  138.       Height          =   384
  139.       Index           =   4
  140.       Left            =   600
  141.       Picture         =   "Form1.frx":2210
  142.       ScaleHeight     =   384
  143.       ScaleWidth      =   384
  144.       TabIndex        =   2
  145.       Top             =   1440
  146.       Width           =   384
  147.    End
  148.    Begin VB.TextBox Text1 
  149.       Height          =   288
  150.       Left            =   360
  151.       TabIndex        =   0
  152.       Text            =   "Text1"
  153.       Top             =   840
  154.       Width           =   1212
  155.    End
  156.    Begin VB.Label Label1 
  157.       Alignment       =   2  'Center
  158.       Caption         =   "3D Buttons"
  159.       Height          =   192
  160.       Left            =   2040
  161.       TabIndex        =   1
  162.       Top             =   960
  163.       Width           =   1992
  164.    End
  165. Attribute VB_Name = "Form1"
  166. Attribute VB_GlobalNameSpace = False
  167. Attribute VB_Creatable = False
  168. Attribute VB_PredeclaredId = True
  169. Attribute VB_Exposed = False
  170. 'For this to work:
  171. 'Form's Autoredraw = False
  172. 'Form's ClipControls = False
  173. 'For every picture(Button) as well
  174. 'Note that the effect works for picture, and text,
  175. 'but not for label controls.
  176. 'For the effect to work you MUST include the 3 events:
  177. 'MouseMove = "Over", MouseDown = "Down", MouseUp = "Up"
  178. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  179. Call LCocx1.DButton(Form1, Form1, "Over")
  180. End Sub
  181. Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  182. Call LCocx1.DButton(Form1, Label1, "Down")
  183. End Sub
  184. Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  185. Call LCocx1.DButton(Form1, Label1, "Over", Button)
  186. End Sub
  187. Private Sub Label1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  188. Call LCocx1.DButton(Form1, Label1, "Up")
  189. End Sub
  190. Private Sub Picture1_DblClick(Index As Integer)
  191.        Call LCocx1.DButton(Form1, Picture1(Index), "Down")
  192. End Sub
  193. Private Sub Picture1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  194.        Call LCocx1.DButton(Form1, Picture1(Index), "Down")
  195. End Sub
  196. Private Sub Picture1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  197. Call LCocx1.DButton(Form1, Picture1(Index), "Over", Button)
  198. End Sub
  199. Private Sub Picture1_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  200. Call LCocx1.DButton(Form1, Picture1(Index), "Up")
  201.        Select Case Index
  202.        Case 0 ' pressed first button
  203.         MsgBox "New"
  204.         Call LCocx1.DButton(Form1, Form1, "Over")
  205.         Exit Sub
  206.        Case 1 ' pressed second button
  207.         MsgBox "Open"
  208.         Call LCocx1.DButton(Form1, Form1, "Over")
  209.         Exit Sub
  210.        '     ' You can add more if needed
  211. End Select
  212. End Sub
  213. Private Sub Picture3_DblClick(Index As Integer)
  214. Call LCocx1.DButton(Form1, Picture3(Index), "Down")
  215. End Sub
  216. Private Sub Picture3_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  217. Call LCocx1.DButton(Form1, Picture3(Index), "Down")
  218. End Sub
  219. Private Sub Picture3_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  220. Call LCocx1.DButton(Form1, Picture3(Index), "Over", Button)
  221. End Sub
  222. Private Sub Picture3_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  223. Call LCocx1.DButton(Form1, Picture3(Index), "Up")
  224. End Sub
  225. Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  226. Call LCocx1.DButton(Form1, Text1, "Down")
  227. End Sub
  228. Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  229. Call LCocx1.DButton(Form1, Text1, "Over", Button)
  230. End Sub
  231. Private Sub Text1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  232. Call LCocx1.DButton(Form1, Text1, "Up")
  233. End Sub
  234.